import { axios } from '@/utils/request'

export function selectList(parameter) {
  return axios({
    url: '/face/store/selectList/' + parameter.pageNum + "/" + parameter.pageSize,
    method: 'post',
    data: parameter
  })
}

export function del(parameter) {
  return axios({
    url: '/face/store/delete/' + parameter,
    method: 'get'
  })
}

export function save(parameter) {
  return axios({
    url: '/face/store/addOrUpdate',
    method: 'post',
    params: parameter
  })
}

export function updateStoreAdvertisement(parameter) { //修改门店广告
  return axios({
    url: '/face/store/updateStoreAdvertisement',
    method: 'post',
    data: parameter
  })
}

export function deleteStroeDevice(parameter) { //删除门店设备
  return axios({
    url: '/face/store/deleteStroeDevice',
    method: 'post',
    params: parameter
  })
}

export function selectAdvertisementList(parameter) { //查询门店广告列表
  return axios({
    url: '/face/store/selectAdvertisementList/' + parameter.pageNum + "/" + parameter.pageSize,
    method: 'post',
    data: parameter
  })
}


export function updateStoreDevice(parameter) { //设备管理
  return axios({
    url: '/face/store/updateStoreDevice',
    method: 'get',
    params: parameter
  })
}

export function addStoreDevice(parameter) { //新增设备门店
  return axios({
    url: 'face/store/addStoreDevice',
    method: 'get',
    params: parameter
  })
}

export function selectAll(parameter) {
  return axios({
    url: '/face/store/selectAll',
    method: 'get'
  })
}
export function setSelectAll(parameter) { //查询所有未分配设备
  return axios({
    url: '/face/device/selectAll',
    method: 'get'
  })
}

export function selectDeviceList(parameter) { //根据门店Id查询已绑定设备
  return axios({
    url: '/face/store/selectDeviceList/'+ parameter,
    method: 'get'
  })
}

export function selectTree(parameter) {
  return axios({
    url: '/face/store/selectTree',
    method: 'get',
    params:parameter
  })
}

export function selectPaymentByOrderId(parameter) {
  return axios({
    url: '/face/tOrder/selectPaymentByOrderId/'+ parameter,
    method: 'get'
  })
}

export function selectAllArea() {
  return axios({
    url: '/sys/area/selectAllArea',
    method: 'get'
  })
}

